﻿@model XRM.Security.WebUI.Models.Account.LoginModel

@{
    Layout = null;
}

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>АИС «СКАЗИ» - Вход в систему</title>
        
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/common")
        @Scripts.Render("~/bundles/jqueryval")
    </head>
    <body>
        <div class="container">
            <div class="row">
                <div class="col-md-4 col-md-offset-4">
                    <div class="login-panel panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">Вход в систему</h3>
                        </div>
                        <div class="panel-body">
                            @using (Html.BeginForm("Login", "Account", FormMethod.Post))
                            {
                                @Html.AntiForgeryToken()

                                if (TempData["AlertType"] != null)
                                {
                                    <div class="alert alert-danger">@TempData["AlertMessage"]</div>
                                }
                                <div class="form-group">
                                    @Html.LabelFor(m => m.UserName, new { @class = "control-label" })
                                    @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.UserName)
                                </div>

                                <div class="form-group">
                                    @Html.LabelFor(m => m.Password, new { @class = "control-label" })
                                    @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.Password)
                                </div>
        
                                <div class="form-group">
                                    <button type="submit" class="btn btn-lg btn-primary btn-block">Войти</button>
                                </div>
                                <a href="/WindowsAuth/InternalAccount/LogOn?returnUrl=@ViewBag.ReturnUrl">Войти под текущей учетной записью</a>
                            }
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>